﻿using System;
using System.ComponentModel;
using System.Linq;
using System.Xml.Serialization;

namespace Microsoft.WowAddonStudio.FrameXml.Serialization.LayoutFrames
{
    [Serializable]
    [DesignerCategory("code")]
    [XmlType(Namespace = "http://www.blizzard.com/wow/ui/")]
    [XmlRoot(Namespace = "http://www.blizzard.com/wow/ui/", IsNullable = false)]
    public class TabardModel : PlayerModel
    {
        /// <summary>
        /// Gets a value indicating whether a serialization object is complete and can be rendered.
        /// </summary>
        public override bool IsComplete
        {
            get
            {
                return this.Layers.SelectMany(layer => layer.Items)
                           .OfType<Texture>()
                           .Count() > 0;
            }
        }
    }
}